Enable xenstored optimisations.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 6 Sep 2005 15:47:23 +0000 (15:47 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 6 Sep 2005 15:47:23 +0000 (15:47 +0000)
Signed-off-by: Keir Fraser <keir@xensource.com>
tools/xenstore/Makefile
tools/xenstore/xenstored_core.c

index 13164f08d60f9918085713161ad5cce6f6d61d34..82c64dfc6f8b043dfe81fc1fabaff3f7d1a48840 100644 (file)
@@ -12,7 +12,7 @@ BASECFLAGS=-Wall -W -g -Werror
 # Make gcc generate dependencies.
 BASECFLAGS += -Wp,-MD,.$(@F).d
 PROG_DEP = .*.d
-#BASECFLAGS+= -O3 $(PROFILE)
+BASECFLAGS+= -O3 $(PROFILE)
 #BASECFLAGS+= -I$(XEN_ROOT)/tools
 BASECFLAGS+= -I$(XEN_ROOT)/tools/libxc
 BASECFLAGS+= -I$(XEN_ROOT)/xen/include/public
index 10c9f5db337a99fd73470b920c4a1ce357508286..ea78747d2a19342ce0a72360d14c89f2c36a7fbe 100644 (file)
@@ -1304,8 +1304,12 @@ static int out_of_mem(void *data)
 
 static void consider_message(struct connection *conn)
 {
-       struct buffered_data *in = NULL;
-       enum xsd_sockmsg_type type = conn->in->hdr.msg.type;
+       /*
+        * 'volatile' qualifier prevents register allocation which fixes:
+        *   warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork'
+        */
+       struct buffered_data *volatile in = NULL;
+       enum xsd_sockmsg_type volatile type = conn->in->hdr.msg.type;
        jmp_buf talloc_fail;
 
        assert(conn->state == OK);
@@ -1443,7 +1447,11 @@ static void unblock_connections(void)
 
 struct connection *new_connection(connwritefn_t *write, connreadfn_t *read)
 {
-       struct connection *new;
+       /*
+        * 'volatile' qualifier prevents register allocation which fixes:
+        *   warning: variable 'xxx' might be clobbered by 'longjmp' or 'vfork'
+        */
+       struct connection *volatile new;
        jmp_buf talloc_fail;
 
        new = talloc(talloc_autofree_context(), struct connection);